<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>jq</title>
    <script type="text/javascript" src="static/js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript">

        function f1() {
            let str='   1   2   3'
            let ss=$.trim(str);
            console.log(ss);
        }//去空格

        function f2() {
            let paObject={
                ss:3,
                m2:'u'
            }
            let pas=$.param(paObject)
            console.log(pas);
        }//拼接url参数

        (($)=>{
            $.fn.extend({
                'shaMa':(e)=>{
                    console.log(e);
                }
            });
        })(jQuery);
        // plugin created by myself
        //it will works int the $("body").shaMa('is worked?')


        (function($){
            $.fn.extend({
                "al":function(text){
                    //这里写插件代码
                    alert(text);
                }
            });
        })(jQuery);
        //it will works int the $("body").al('is worked?')

        (function($){
            $.extend({
                "aal":function(text){
                    //这里写插件代码
                    alert(text);
                }
            });
        })(jQuery);
        //it will work in $.aal("类级别方式一");

        $(()=>{
            // shaMa('mess')
            // al('??')
            // $("body").al("对象级别方式一");
            //  $/*("body")*/.shaMa('is worked?')

            //$.aal("类级别方式一");


        });


    </script>
</head>
<body>
<div>
    <div>

    </div>
</div>

</body>
</html>
